Api.ReadOutputByte 方法

從實體或模擬 I/O 模組的輸出讀取一個帶有位元組偏移量的位元組。

命名空間IntervalZero.KINGSTAR.Local.Api

組合: IntervalZero.KINGSTAR.Local.Api (於 IntervalZero.KINGSTAR.Local.dll) 版本:4.4.0.0

語法

C#VB
public KsReturn<byte> ReadOutputByte(
       int Index,
       int ByteOffset
)
Public Function ReadOutputByte(
       Index As Integer,
       ByteOffset As Integer
) As KsReturn(Of Byte)

參數

Index

型別:Int32

I/O 模組的索引。索引以 0 為起始;別名將影響此參數。

 

ByteOffset

型別:int

指定位元組偏移量到一個位置,以讀取位元組值。最大偏移量由 SlaveStatus 類別中的 OutputLength決定。

回傳值

型別:KsReturn<byte>

回傳一個 KsError 代碼及一個 byte 值。

備註

ReadOutputByte 僅能在連結建立並開始啟用時才能呼叫。

可用的 EtherCAT 狀態

ecatOP

範例

C#
N/A

參見

Api 類別

IntervalZero.KINGSTAR.Local.Api 命名空間